<?xml version="1.0" encoding="utf-8"?>
<taskrunner name="set.install.type" version="1.0" date="2008-10-28" maxthreads="1">

  <!-- 
  
    Sets install.type to either:
      INSTALL, LANGUAGE or UNINSTALL
  
    Sets the install type. 
    if install type = LANGUAGE then the global property KeepLocalDb will be set to true
    if install type = INSTALL then the global property KeepLocalDb will be set to false (default value, which
    can be changed later on in the installation scripts)
  -->
  
  <includes>
    <file name="vida.install.settings.xml" />
  </includes>

  <parameters>
    <parameter name="install.type" value="#INPUT"/>
  </parameters>

  <tasks>

    <task name="set.install.type" typename="@SetGlobalProperty">
      <description>
        Sets the global property install.type to LANGUAGE.
      </description>
      <dependencies list=""/>
      <parameters>
        <parameter name="property.name" value="install.type"/>
        <parameter name="property.value" value="${install.type}"/>
      </parameters>
    </task>

    <task name="set.keeplocaldb.true" condition="${install.type}=LANGUAGE" typename="@SetGlobalProperty">
      <description>
        Sets the global property KeepLocalDb to True. 
      </description>
      <dependencies list="set.install.type"/>
      <parameters>
        <parameter name="property.name" value="KeepLocalDb"/>
        <parameter name="property.value" value="true"/>
      </parameters>
    </task>

    <task name="set.keeplocaldb.false" condition="${install.type}=INSTALL" typename="@SetGlobalProperty">
      <description>
        Sets the global property KeepLocalDb to True. This is only used for setting the property to
        a default value. Later in the installation this value can be changed.
      </description>
      <dependencies list="set.install.type"/>
      <parameters>
        <parameter name="property.name" value="KeepLocalDb"/>
        <parameter name="property.value" value="false"/>
      </parameters>
    </task>
    
  </tasks>
  
</taskrunner>